<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--文件上传-->
<form th:action="@{/upload}" method="post" enctype="multipart/form-data">
    avatar <input type="file" name="avatar">
    <input type="submit" value="upload">
</form>
</body>
</html>